﻿using System.Collections.Generic;

namespace TestUp.Models.TestWorkers.FileToXmlParsers
{
    public class TestFileParsers
    {
        private static Dictionary<TestFileTypes, BaseTestFileParser> parsers = new Dictionary<TestFileTypes, BaseTestFileParser>();

        static TestFileParsers()
        {
            parsers.Add(TestFileTypes.Xml, new XmlTypeParser());
        }

        public static BaseTestFileParser Get(TestFileTypes type)
        {
            BaseTestFileParser parser;
            parsers.TryGetValue(type, out parser);
            return parser;
        }
    }
}